Denizen Script Events


Events are a way to listen to things that happened on your server and respond to them through a script. These usually pair with 'world' script containers.
Learn about how events work in The Beginner's Guide.


Showing 1 out of 378 events...
Nameentity potion effects modified
Event Lines <entity> potion effects modified
<entity> potion effects <change_action>
Triggerswhen an entity's potion effects change.
Generated Examplesafter entity potion effects modified:
after entity potion effects change_action:
on entity potion effects modified:
Has Playerwhen the entity that has changed is a player. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Has NPCwhen the entity that has changed is an NPC.
Switchescause:<cause> to only process the event when it came from a specified cause.
effect:<effect type> to only process the event when a specified potion effect is applied.
Contexts<context.entity> returns the EntityTag.
<context.cause> returns the cause of the effect change, based on 🔗https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityPotionEffectEvent.Cause.html
<context.action> returns the action of the effect changed, which can be 'added', 'changed', 'cleared', or 'removed'
<context.override> returns whether the new potion effect will override the old.
<context.new_effect_data> returns the new potion effect (in the same format as Tag:EntityTag.effects_data) (if any).
<context.old_effect_data> returns the old potion effect (in the same format as Tag:EntityTag.effects_data) (if any).
<context.effect_type> returns the name of the modified potion effect type.
Determine"OVERRIDE:<ElementTag(Boolean)>" to set whether the new potion effect should override.
CancellableTrue - This adds <context.cancelled> and determine 'cancelled' or 'cancelled:false'
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupEntity
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/events/entity/EntityPotionEffectScriptEvent.java#L17